package com.codeyang.controller;

import com.codeyang.anno.Log;
import com.codeyang.domain.SysRole;
import com.codeyang.service.SysRoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 描述: TO-删除标志-DO
 *
 * @author CodeYang_Site
 * @version 2021/5/24 16:26
 */
@Api(tags = "后台角色管理接口")
@RestController
@RequestMapping("sys/role")
public class RoleController {


    @Autowired
    private SysRoleService sysRoleService;


    @ApiOperation("全查询角色列表")
    @Log(operation = "全查询角色列表")
    @GetMapping("list")
    public ResponseEntity<List<SysRole>> getRoleList() {
        List<SysRole> list = sysRoleService.list();
        return ResponseEntity.ok(list);
    }
}
